import request from '@/utils/request'

export default {

    // 新增小节
    insertVideo(video) {
        return request({
            url: `/eduservice/video/insertVideo`,
            method: 'post',
            data: video
        })
    },

    // 根据小节id查询小节
    queryVideoById(id) {
        return request({
            url: `/eduservice/video/queryVideoById/${id}`,
            method: 'get'
        })
    },

    // 更新小节
    updateVideo(video) {
        return request({
            url: `/eduservice/video/updateVideo`,
            method: 'put',
            data: video
        })
    },

    // 根据小节id删除小节
    deleteVideoById(id) {
        return request({
            url: `/eduservice/video/deleteVideoById/${id}`,
            method: 'delete'
        })
    },

}